Skip to content

Optimisation plugin for usage with Flutter module. #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

EgorLogachev
Copy link

@EgorLogachev EgorLogachev commented Nov 6, 2021

Hi @LinusU . Thank you for your flutter_web_auth plugin. It helped us with our OAuth solution and saved our time. In our case we have 3 mobile apps on Native Android, iOS, and Flutter with the same functionality of authorization, so we've decided to implement the Flutter module and integrate it to the native side. We've faced some problems, so we have decided to optimize flutter_web_auth for Flutter modules. I suggest it can be useful for you and developers that use your solution.

Changes:

  • Android dependencies have been updated (repositories, Gradle plugin version, Kotlin version, etc.)
  • Android project migrated accordingly to new Android plugins APIs

BREAKING CHANGES:

  • Callback handling has been re-worked, so CallbackActivity has been removed as redundant. Right now enough register Intent Filter for your Flutter Activity only
<activity
    android:exported="true"
    android:name=".FlutterActivity"
    android:launchMode="singleTop"
    android:theme="@style/LaunchTheme"
    android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
    android:hardwareAccelerated="true"
    android:windowSoftInputMode="adjustResize" >

    <intent-filter android:label="flutter_web_auth">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="YOU CALLBAK URI SCHEME" />
    </intent-filter>

</activity>
  • As I understood you were faced with the problem of handling browser results on Android, so you have added the cleanUpDanglingCalls feature. This feature has been re-worked and replaced from Flutter public interface to the Android native side.

  • We had a problem on the iOS side with obtaining FlutterViewController because in our case FlutterViewController was presented as a modal controller, so this line of code UIApplication.shared.delegate?.window??.rootViewController as? FlutterViewController didn't work for us. To fix that we have added FlutterPresentationContextProviding protocol, and each developer can implement it for AppDelegate and implement logic on how to obtain FlutterViewContorller.

pavlo-bilohaienko and others added 16 commits November 3, 2021 13:26
… has been removed from plugin, process of receiving of callback uri has been refactored, CallbackActivity has been removed as redundant
…esult_on_android

Returning result for android has been re-worked, cleanUpDanglingCalls…
…nking

Feature/app delegate controller linking
…to_flutter_3.0

KAA-1037: fixed override of onNewIntent by making Intent non-nullable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants